
package de.carcophan.jimdb.jsf.backing;

import de.carcophan.jimdb.ejb.entites.Status;
import de.carcophan.jimdb.ejb.entites.service.StatusFacade;
import java.io.Serializable;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;

@Named(value = "statusBackingBean")
@ApplicationScoped
public class StatusBackingBean implements Serializable {

    @EJB
    StatusFacade statusFacade;
    private List<Status> statuses;

    @PostConstruct
    public void initStatuses() {
        this.statuses = statusFacade.findAll();
    }

    public List<Status> getStatuses() {
        return statuses;
    }

    public void setStatuses(List<Status> statuses) {
        this.statuses = statuses;
    }
}
